import { useQuery } from "@tanstack/react-query";
import { request } from "../api/request";
import { EXAMPLAN_URL } from "../constants/url";

const ExamPlanFn = async (queryKey) => {
  const { data } = await request(
    {
      method: "get",
      url: EXAMPLAN_URL,
    },
    true
  );
  return {
    data,
  };
};

export default function useExamPlan() {
  return useQuery(["examplan"], ExamPlanFn);
}
